
<form action="index" method="POST" id="frmAddTraining" enctype="multipart/form-data" autocomplete="off">
<!--Table chua cac textbox, combobox de nhap du lieu-->
	<?php 
		$TR10 = $this->TR10;
		$strStaff = $this->strStaff;
		$check = '';
		if($TR10 != '')	 
			$check = 'checked="true"'; 
		$U05 = $this->U05;
		$checkStatus = '';
		if($U05 == 'HOAT_DONG' || $U05 == '')	 
			$checkStatus = 'checked="true"'; 
		echo $this->formHidden("hdn_action",0,null);
		echo $this->formHidden("hdn_FkParentNode",$this->FkParentNode,null);
		echo $this->formHidden("selectValueTreeImg",$this->selectValueTreeImg,null);
		echo $this->formHidden("selectValueTrainingTree",$this->selectValueTrainingTree,null);
		echo $this->formHidden("hdn_TR03",$this->TR03,null);
		echo $this->formHidden("hdn_act",$this->act,null);
		echo $this->formHidden("sType",$this->sType,null);
	?> 
	<div class="button-link-container" style="height: 28px;padding-top: 5px;">
		<div class="blc-left normal_title">CẬP NHẬT ĐỐI TƯỢNG</div>
		<div class = "blc-right">
			<input  type="button" id="add" name="add" class="link-button clsave" value="Ghi & Thêm mới" action ="next" />
			<input  type="button" id="btn_quaylai" name="btn_quaylai" class="link-button clsave" value="Ghi & quay lại" action ="back" />
			<input  type="button" id="btn_quaylai" name="btn_quaylai" class="link-button clback" value="Quay lại"/>
		</div>
	</div>
	<!--Textbox -->
<div id="form-content">	
	<div>
		<table id="form-content" width="99%" align="center" cellpadding="0" cellspacing="0" border="0" class="buton_table">
			<col width="10%"><col width="25%"><col width="10%"><col width="25%"><col width="30%">
				<tr>
					<td class="normal_label" style="display:inline-block;padding-left:5px;margin-top: 10px;">Mã đối tượng</td>
					<td ><input name="TR03" id="TR03" type="text" class="textbox_tab input1" style="width:100%" value="<?php echo $this->TR03;?>" disabled="disabled" optional="true"></td>
					<td class="normal_label" style="display:inline-block;padding-left:5px;margin-top: 10px;">Tên đối tượng<small class="normal_starmark">*</small></td>
					<td><input name="TR04" id="TR04" Type="text" class="textbox_tab input1" style="width:100%" value="<?php echo $this->TR04;?>" maxlength="" optional="false" message="Bạn phải nhập tên đối tượng" ></td>
				</tr>
				<tr>
					<td class="normal_label" style="padding-left:5px;">Đối tượng thuộc<small class="normal_starmark">*</small></td>
					<td colspan="3"><input type="text" name="TR02" id="TR02" readonly="" class="textbox_tab input1" style="width:94%" value="<?= $this->parentNode;?>" optional="false" message="Bạn phải chọn đối tượng cha">
						<img src="<?php echo $this->baseUrl;?>/images/find.gif" class="normal_image imgGetDep" />
					</td>	
				</tr>
				<tr>
					<td class="normal_label" style="padding-left:5px;">Thứ tự<small class="normal_starmark">*</small></td>
					<td><input name="TR07" id="TR07" Type="text"  value="<?php echo $this->iOrder;?>" class="textbox_tab input1" maxlength="" optional="false" message="Thứ tự không được để trống"  isnumeric="" min="" max="" ></td>
					<td class="normal_label" style="padding-left:5px;">Trạng thái</td>
					<td>
						<input type="checkbox" name="TR05" id="TR05" <?echo $checkStatus;?> />
						<font class = "lbl_title normal_label">Hoạt động</font></td>
				</tr>
				</tr>
				<tr>
					<td>
						<label class = "normal_label" style="padding-left:5px;"  for="groupOrgTypeFilter">Đơn vị<small class="normal_starmark">*</small></label>
					</td>
					<td>
						<select data-placeholder=" " name ="TR09" id ="TR09" style="width:100%;" class="chzn-select" tabindex="2">
						<?php 	
							echo Efy_Library::_generateSelectOption($this->arrTR09,'code','code','name',$this->TR09);
						?>
						</select>
					</td>	
				</tr>
				<tr>
					<td>
						<label class="normal_label" style="padding-left:5px;" for="permissionProcess">Quyền thực hiện :<small class="normal_starmark">*</small></label>
					<td>
				</tr>
				<tr>
					<td>
					</td>	
					<td class="normal_label" colspan="3">
						<input type="radio" id="TR10" name="TRPer" <?echo $check;?> value="0">
						<label for="TR10">Không phân biệt vai trò NSD</label><br>
						<input type="radio" id="TR11" name="TRPer" <?php if($strStaff != '') echo 'checked="true"';?> value="1">
						<label for="TR11">Giới hạn quyền sử dụng</label>
						<div id="ajax_staff">	
						</div>
						<?php if($strStaff != ''){
							$arrReceiveStaff= explode("!@@!",$strStaff);
							$sReceiveFkList 	 = $arrReceiveStaff[0];
							if($sReceiveFkList != "") $sReceiveFkList = $sReceiveFkList;
							$arrReceiveFkList	=	explode(",",$sReceiveFkList);
							$arrReceivePositionNameList = explode(",",$arrReceiveStaff[1]); 							
						?>
						<div id="ajax_receive" >	
							<?php
							$this->formFielName	= "C_RECEIVE_ID_LIST";	
							$spRetHtml = "<div style='display:none'><input type='textbox' id='$this->formFielName' name='$this->formFielName' value='' hide='true' readonly optional = true xml_data=true xml_tag_in_db='' message=''></div>";		
							$objXml = new Efy_Xml();
							echo $spRetHtml.$objXml->_generateHtmlForTreeUser($sReceiveFkList);	?>
						</div>
						<? }?>
					</td>
				</tr>			
				<tr style="display:none">
					<td height="37"></td>
					<td><input type="checkbox" name="chk_save_and_add_new" id="chk_save_and_add_new" optional = "true"  onclick="btn_single_checkbox_onclick(document.getElementById('chk_save_and_add_new'),document.getElementById('hdn_save_and_add_new'))" ></td>
				</tr>
				<tr><td height="5">&nbsp;</td></tr>
		</table>
	</div>
<!--bang chua cac button Chap nhan, Quay lai-->
	<div id="button">
		<input  type="button" id="add" name="add" class="link-button clsave" value="Ghi & Thêm mới" action ="next" />
		<input  type="button" id="btn_quaylai" name="btn_quaylai" class="link-button clsave" value="Ghi & quay lại" action ="back" />
		<input  type="button" id="btn_quaylai" name="btn_quaylai" class="link-button clback" value="Quay lại"/>
	</div>
	<div id ="dialog" title = "Chọn đối tượng">
		<div id="treeDialog"></div>
	</div>
</div>
</form>

 <script type="text/javascript">
 	document.getElementById('TR04').focus()
	jQuery(".chzn-select").chosen();
</script>
<style type="text/css">
.ui-widget-header {
	    background: none repeat scroll 0 0 #3774B7;
	    border: none; 
	    color: #FFF701;
	    font-weight: bold;
	}

.ui-dialog .ui-dialog-title {
    float: left;
    margin: 0.1em 0;
    text-align: center;
}
.ui-dialog .ui-dialog-title {
    float: left;
    margin: 0.1em 0;
    text-align: center;
}
</style>